package com.bootdo.blog.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.bootdo.blog.dao.DrugMapper;
import com.bootdo.blog.domain.DrugDO;
import com.bootdo.blog.service.DrugService;



@Service
public class DrugServiceImpl implements DrugService {
	@Autowired
	private DrugMapper drugMapper;
	
	@Override
	public DrugDO get(Integer drugId){
		return drugMapper.get(drugId);
	}
	
	@Override
	public List<DrugDO> list(Map<String, Object> map){
		return drugMapper.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return drugMapper.count(map);
	}
	
	@Override
	public int save(DrugDO drug){
		Date doesTime = drug.getDoesTime();
		Date durationTime = drug.getDurationTime();
		System.out.println(doesTime+"++++"+durationTime);
		return drugMapper.save(drug);
	}
	
	@Override
	public int update(DrugDO drug){
		return drugMapper.update(drug);
	}
	
	@Override
	public int remove(Integer drugId){
		return drugMapper.remove(drugId);
	}
	
	@Override
	public int batchRemove(Integer[] drugIds){
		return drugMapper.batchRemove(drugIds);
	}
	
}
